//package com.rxyb.auth.handler;
//
//import com.rxyb.core.respone.enums.CommonCode;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.http.MediaType;
//import org.springframework.security.access.AccessDeniedException;
//import org.springframework.security.web.access.AccessDeniedHandler;
//
//import javax.servlet.ServletException;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
///**
// * 权限不足 拒绝访问
// *
// * @author duyh
// * @date 2020/5/22
// */
//@Slf4j
//public class AuthLimitHandler implements AccessDeniedHandler {
//
//    @Override
//    public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException {
//        //        System.out.println("您没有权限访问地址：" + request.getRequestURI());
//        //        response.sendRedirect("/limit");
//        log.info("This is AuthLimitHandler.....");
//        response.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE);
//        response.getWriter().write(CommonCode.SYS_NOAUTH.toString());
//
//    }
//
//}
